<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: src/wickrcrypto/include/wickrcrypto/crypto_engine.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_92a70b6cc7e213c660915fdf1190028f.html">wickrcrypto</a></li><li class="navelem"><a class="el" href="dir_db4377ef08cfba82f5e7141624102360.html">include</a></li><li class="navelem"><a class="el" href="dir_2adb4122f2f58e588d09641dee9865e2.html">wickrcrypto</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">crypto_engine.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2012-2018 Wickr Inc.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * ONLY.  COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED.  For additional details,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * please see LICENSE</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * THE CODE IS MADE AVAILABLE &quot;AS-IS&quot; AND WITHOUT ANY EXPRESS OR</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef crypto_engine_h</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define crypto_engine_h</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;buffer.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;cipher.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;digest.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;eckey.h&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;ecdsa.h&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;kdf.h&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structwickr__crypto__engine.html">   53</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine</a> {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structwickr__crypto__engine.html#a2145e35235dc5c5c944f33ea3d2963bd">   55</a></span>&#160;    <a class="code" href="structwickr__ec__curve.html">wickr_ec_curve_t</a> <a class="code" href="structwickr__crypto__engine.html#a2145e35235dc5c5c944f33ea3d2963bd">default_curve</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structwickr__crypto__engine.html#a307f7d46b55b1e0a93ce9d9489ba8fc5">   56</a></span>&#160;    <a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> <a class="code" href="structwickr__crypto__engine.html#a307f7d46b55b1e0a93ce9d9489ba8fc5">default_cipher</a>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    </div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gae12855853c05caa473e748a62611d307">   66</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_crypto_random)(<span class="keywordtype">size_t</span> len);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gabc120effc5248a491b18138f9b74b526">   76</a></span>&#160;    <a class="code" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *(*wickr_crypto_engine_cipher_key_random)(<a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> cipher);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    </div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gaf7be0d0ca0d9e7a0c5c3b1ec0fd0918e">   91</a></span>&#160;    <a class="code" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *(*wickr_crypto_engine_cipher_encrypt)(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *plaintext,</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                                                                 <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *aad,</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                                                                 <span class="keyword">const</span> <a class="code" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *key,</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                                                                 <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *iv);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    </div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga459ef821cc40edb5e3c9ce1d571ddc00">  107</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_cipher_decrypt)(<span class="keyword">const</span> <a class="code" href="structwickr__cipher__result.html">wickr_cipher_result_t</a> *cipher_result,</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                                                          <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *aad,</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                                                          <span class="keyword">const</span> <a class="code" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *key,</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                                                          <span class="keywordtype">bool</span> only_auth_ciphers);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gaa77b1bc373d92d9db9d801bcc4a4d29c">  122</a></span>&#160;    bool (*<a class="code" href="group__wickr__crypto__engine.html#gaa77b1bc373d92d9db9d801bcc4a4d29c">wickr_crypto_engine_encrypt_file</a>)(<span class="keyword">const</span> <a class="code" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *key,</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                                             <span class="keyword">const</span> <span class="keywordtype">char</span> *sourceFilePath,</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                                             <span class="keyword">const</span> <span class="keywordtype">char</span> *destinationFilePath);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    </div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga361b843efc839e30f90ce24c15b1dd27">  138</a></span>&#160;    bool (*<a class="code" href="group__wickr__crypto__engine.html#ga361b843efc839e30f90ce24c15b1dd27">wickr_crypto_engine_decrypt_file</a>)(<span class="keyword">const</span> <a class="code" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *key,</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                                             <span class="keyword">const</span> <span class="keywordtype">char</span> *sourceFilePath,</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                                             <span class="keyword">const</span> <span class="keywordtype">char</span> *destinationFilePath,</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                                             <span class="keywordtype">bool</span> only_auth_ciphers);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    </div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga42dfc5b4df166616d962ee4c792ceaf4">  154</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_digest)(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer,</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                                                  <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *salt,</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                                                  <a class="code" href="structwickr__digest.html">wickr_digest_t</a> digest_mode);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    </div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga298d2dea6722151c11e04458d3924823">  167</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_digest_file)(FILE *in_file,</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                                                       <span class="keyword">const</span> <a class="code" href="structwickr__digest.html">wickr_digest_t</a> mode);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    </div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gad16b229b7d16cf00d3983c277ee3b88b">  178</a></span>&#160;    <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *(*wickr_crypto_engine_ec_rand_key)(<a class="code" href="structwickr__ec__curve.html">wickr_ec_curve_t</a> curve);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    </div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga87a069bbd3cdf509946e4ca0ca008f8f">  189</a></span>&#160;    <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *(*wickr_crypto_engine_ec_key_import)(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer,</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                                                         <span class="keywordtype">bool</span> is_private);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    </div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gac5a36d2a53e06a75a2b818e6a5cc96a1">  203</a></span>&#160;    <a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *(*wickr_crypto_engine_ec_sign)(<span class="keyword">const</span> <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *ec_signing_key,</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                                                         <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data_to_sign,</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                                                         <span class="keyword">const</span> <a class="code" href="structwickr__digest.html">wickr_digest_t</a> digest_mode);</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    </div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gae541acc6433f6f5ffe84382ccd5e4f97">  217</a></span>&#160;    bool (*<a class="code" href="group__wickr__crypto__engine.html#gae541acc6433f6f5ffe84382ccd5e4f97">wickr_crypto_engine_ec_verify</a>)(<span class="keyword">const</span> <a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *signature,</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                                          <span class="keyword">const</span> <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *ec_public_key,</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                                          <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data_to_verify);</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    </div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#gab624f62e1d434c5b8222eabd656feb48">  230</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_gen_shared_secret)(<span class="keyword">const</span> <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *local, <span class="keyword">const</span> <a class="code" href="structwickr__ec__key.html">wickr_ec_key_t</a> *peer);</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    </div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga782e0e8786ecf8a55c8ae2aea2f178aa">  242</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *(*wickr_crypto_engine_hmac_create)(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data,</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                                                       <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *hmac_key,</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                                                       <a class="code" href="structwickr__digest.html">wickr_digest_t</a> digest_mode);</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    </div><div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga00c52a816403192af5b21d952265d0b6">  257</a></span>&#160;    bool (*<a class="code" href="group__wickr__crypto__engine.html#ga00c52a816403192af5b21d952265d0b6">wickr_crypto_engine_hmac_verify</a>)(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *data,</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                                            <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *hmac_key,</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                                            <span class="keyword">const</span> <a class="code" href="structwickr__digest.html">wickr_digest_t</a> mode,</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                                            <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *expected);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    </div><div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga5ab29968c993423df83c9f1a3d7e685d">  272</a></span>&#160;    <a class="code" href="structwickr__kdf__result.html">wickr_kdf_result_t</a> *(*wickr_crypto_kdf_gen)(<a class="code" href="structwickr__kdf__algo.html">wickr_kdf_algo_t</a> algo,</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                                                <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    </div><div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="group__wickr__crypto__engine.html#ga640cbc86ca36c4deb2c197de89dce7d1">  285</a></span>&#160;    <a class="code" href="structwickr__kdf__result.html">wickr_kdf_result_t</a> *(*wickr_crypto_kdf_meta)(<span class="keyword">const</span> <a class="code" href="structwickr__kdf__meta.html">wickr_kdf_meta_t</a> *existing_meta,</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;};</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine</a> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> <a class="code" href="group__wickr__crypto__engine.html#ga4d68232f729ffeda16657582a5267d07">wickr_crypto_engine_get_default</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__crypto__engine.html#ga5709d94cd09ef0fb47d1a5f59232f115">wickr_crypto_engine_kdf_cipher</a>(<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine,</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;                                               <a class="code" href="structwickr__kdf__algo.html">wickr_kdf_algo_t</a> algo,</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;                                               <a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> cipher,</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;                                               <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *value,</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;                                               <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase);</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__crypto__engine.html#gab60480270e80ba34aa44385633037983">wickr_crypto_engine_kdf_decipher</a>(<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine,</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *input_buffer,</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *passphrase);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<a class="code" href="structwickr__digest.html">wickr_digest_t</a> <a class="code" href="group__wickr__crypto__engine.html#ga18c21501a41c97f2ba79a9366343cdcf">wickr_digest_matching_cipher</a>(<a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> cipher);</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;<a class="code" href="structwickr__digest.html">wickr_digest_t</a> <a class="code" href="group__wickr__crypto__engine.html#ga0a708e5e46c40eae5eaeb581f6a1aed2">wickr_digest_matching_curve</a>(<a class="code" href="structwickr__ec__curve.html">wickr_ec_curve_t</a> curve);</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> <a class="code" href="group__wickr__crypto__engine.html#gaf44e3be9066727bf83034d3593dc74e2">wickr_exchange_cipher_matching_cipher</a>(<a class="code" href="structwickr__cipher.html">wickr_cipher_t</a> cipher);</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;}</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* crypto_engine_h */</span><span class="preprocessor"></span></div><div class="ttc" id="structwickr__kdf__meta_html"><div class="ttname"><a href="structwickr__kdf__meta.html">wickr_kdf_meta</a></div><div class="ttdoc">Represents the information the KDF function will need along with it's input to derive a particular ou...</div><div class="ttdef"><b>Definition:</b> kdf.h:135</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga5709d94cd09ef0fb47d1a5f59232f115"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga5709d94cd09ef0fb47d1a5f59232f115">wickr_crypto_engine_kdf_cipher</a></div><div class="ttdeci">wickr_buffer_t * wickr_crypto_engine_kdf_cipher(const wickr_crypto_engine_t *engine, wickr_kdf_algo_t algo, wickr_cipher_t cipher, const wickr_buffer_t *value, const wickr_buffer_t *passphrase)</div></div>
<div class="ttc" id="structwickr__ec__key_html"><div class="ttname"><a href="structwickr__ec__key.html">wickr_ec_key</a></div><div class="ttdoc">Representation of public and private Elliptic Curve Keypair information as buffers.</div><div class="ttdef"><b>Definition:</b> eckey.h:90</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_gae541acc6433f6f5ffe84382ccd5e4f97"><div class="ttname"><a href="group__wickr__crypto__engine.html#gae541acc6433f6f5ffe84382ccd5e4f97">wickr_crypto_engine::wickr_crypto_engine_ec_verify</a></div><div class="ttdeci">bool(* wickr_crypto_engine_ec_verify)(const wickr_ecdsa_result_t *signature, const wickr_ec_key_t *ec_public_key, const wickr_buffer_t *data_to_verify)</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:217</div></div>
<div class="ttc" id="structwickr__crypto__engine_html_a2145e35235dc5c5c944f33ea3d2963bd"><div class="ttname"><a href="structwickr__crypto__engine.html#a2145e35235dc5c5c944f33ea3d2963bd">wickr_crypto_engine::default_curve</a></div><div class="ttdeci">wickr_ec_curve_t default_curve</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:55</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga4d68232f729ffeda16657582a5267d07"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga4d68232f729ffeda16657582a5267d07">wickr_crypto_engine_get_default</a></div><div class="ttdeci">const wickr_crypto_engine_t wickr_crypto_engine_get_default(void)</div></div>
<div class="ttc" id="structwickr__buffer_html"><div class="ttname"><a href="structwickr__buffer.html">wickr_buffer</a></div><div class="ttdoc">Represents an array of bytes and the length of the allocation associated with those bytes.</div><div class="ttdef"><b>Definition:</b> buffer.h:51</div></div>
<div class="ttc" id="structwickr__kdf__result_html"><div class="ttname"><a href="structwickr__kdf__result.html">wickr_kdf_result</a></div><div class="ttdoc">Represents the result of a KDF function execution.</div><div class="ttdef"><b>Definition:</b> kdf.h:155</div></div>
<div class="ttc" id="structwickr__cipher_html"><div class="ttname"><a href="structwickr__cipher.html">wickr_cipher</a></div><div class="ttdoc">Represents a cipher that can be used in the crypto_engine. This meta object holds parameters for the ...</div><div class="ttdef"><b>Definition:</b> cipher.h:56</div></div>
<div class="ttc" id="structwickr__ecdsa__result_html"><div class="ttname"><a href="structwickr__ecdsa__result.html">wickr_ecdsa_result</a></div><div class="ttdoc">Elliptic Curve Digital Signature Algorithm Result.</div><div class="ttdef"><b>Definition:</b> ecdsa.h:54</div></div>
<div class="ttc" id="structwickr__kdf__algo_html"><div class="ttname"><a href="structwickr__kdf__algo.html">wickr_kdf_algo</a></div><div class="ttdoc">Metadata associated with a particular KDF function.</div><div class="ttdef"><b>Definition:</b> kdf.h:71</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga0a708e5e46c40eae5eaeb581f6a1aed2"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga0a708e5e46c40eae5eaeb581f6a1aed2">wickr_digest_matching_curve</a></div><div class="ttdeci">wickr_digest_t wickr_digest_matching_curve(wickr_ec_curve_t curve)</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_gab60480270e80ba34aa44385633037983"><div class="ttname"><a href="group__wickr__crypto__engine.html#gab60480270e80ba34aa44385633037983">wickr_crypto_engine_kdf_decipher</a></div><div class="ttdeci">wickr_buffer_t * wickr_crypto_engine_kdf_decipher(const wickr_crypto_engine_t *engine, const wickr_buffer_t *input_buffer, const wickr_buffer_t *passphrase)</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_gaa77b1bc373d92d9db9d801bcc4a4d29c"><div class="ttname"><a href="group__wickr__crypto__engine.html#gaa77b1bc373d92d9db9d801bcc4a4d29c">wickr_crypto_engine::wickr_crypto_engine_encrypt_file</a></div><div class="ttdeci">bool(* wickr_crypto_engine_encrypt_file)(const wickr_cipher_key_t *key, const char *sourceFilePath, const char *destinationFilePath)</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:122</div></div>
<div class="ttc" id="structwickr__cipher__result_html"><div class="ttname"><a href="structwickr__cipher__result.html">wickr_cipher_result</a></div><div class="ttdef"><b>Definition:</b> cipher.h:97</div></div>
<div class="ttc" id="structwickr__cipher__key_html"><div class="ttname"><a href="structwickr__cipher__key.html">wickr_cipher_key</a></div><div class="ttdef"><b>Definition:</b> cipher.h:189</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga361b843efc839e30f90ce24c15b1dd27"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga361b843efc839e30f90ce24c15b1dd27">wickr_crypto_engine::wickr_crypto_engine_decrypt_file</a></div><div class="ttdeci">bool(* wickr_crypto_engine_decrypt_file)(const wickr_cipher_key_t *key, const char *sourceFilePath, const char *destinationFilePath, bool only_auth_ciphers)</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:138</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_gaf44e3be9066727bf83034d3593dc74e2"><div class="ttname"><a href="group__wickr__crypto__engine.html#gaf44e3be9066727bf83034d3593dc74e2">wickr_exchange_cipher_matching_cipher</a></div><div class="ttdeci">wickr_cipher_t wickr_exchange_cipher_matching_cipher(wickr_cipher_t cipher)</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga00c52a816403192af5b21d952265d0b6"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga00c52a816403192af5b21d952265d0b6">wickr_crypto_engine::wickr_crypto_engine_hmac_verify</a></div><div class="ttdeci">bool(* wickr_crypto_engine_hmac_verify)(const wickr_buffer_t *data, const wickr_buffer_t *hmac_key, const wickr_digest_t mode, const wickr_buffer_t *expected)</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:257</div></div>
<div class="ttc" id="structwickr__crypto__engine_html_a307f7d46b55b1e0a93ce9d9489ba8fc5"><div class="ttname"><a href="structwickr__crypto__engine.html#a307f7d46b55b1e0a93ce9d9489ba8fc5">wickr_crypto_engine::default_cipher</a></div><div class="ttdeci">wickr_cipher_t default_cipher</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:56</div></div>
<div class="ttc" id="structwickr__digest_html"><div class="ttname"><a href="structwickr__digest.html">wickr_digest</a></div><div class="ttdoc">Digest function parameters.</div><div class="ttdef"><b>Definition:</b> digest.h:54</div></div>
<div class="ttc" id="structwickr__crypto__engine_html"><div class="ttname"><a href="structwickr__crypto__engine.html">wickr_crypto_engine</a></div><div class="ttdoc">Interface to a set of cryptographic operations used throughout the library. Currently the default imp...</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:53</div></div>
<div class="ttc" id="structwickr__ec__curve_html"><div class="ttname"><a href="structwickr__ec__curve.html">wickr_ec_curve</a></div><div class="ttdoc">Metadata about curve types to help with key generation, and signatures.</div><div class="ttdef"><b>Definition:</b> eckey.h:65</div></div>
<div class="ttc" id="group__wickr__crypto__engine_html_ga18c21501a41c97f2ba79a9366343cdcf"><div class="ttname"><a href="group__wickr__crypto__engine.html#ga18c21501a41c97f2ba79a9366343cdcf">wickr_digest_matching_cipher</a></div><div class="ttdeci">wickr_digest_t wickr_digest_matching_cipher(wickr_cipher_t cipher)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
